

#include <iostream>
#include <string>
#include <vector>
#include <climits>
#include <map>
using namespace std;

bool isprime(int n)
{
    if (n < 2)
        return false;

    for (int i = 2; i < n / 2; ++i)
    {
        if (0 == n % i)
            return false;
    }

    return true;
}

void Test1()
{
    string s;
    cin >> s;

    vector<int> cnt(26);
    int maxn = INT_MIN, minn = INT_MAX;
    string resword("Lucky Word");
    int resnum = 0;

    for (const auto& e : s)
    {
        ++cnt[e - 'a'];
    }

    for (const auto& e : cnt)
    {
        if (e > 0)
        {
            if (maxn < e)
                maxn = e;
            if (minn > e)
                minn = e;
        }
    }

    if (!isprime(maxn - minn))
    {
        resword = "No Answer";
        resnum = 0;
    }
    else
    {
        resnum = maxn - minn;
    }

    cout << resword << endl;
    cout << resnum << endl;
}

class Solution
{
public:
    bool hostschedule(vector<vector<int> >& schedule)
    {
        map<int, int> mp;
        int prevbeg = 0, time = 0;

        for (const auto& v : schedule)
        {
            mp[v[0]] = v[1];
        }

        for (const auto& e : mp)
        {
            if (e.first < prevbeg + time)
                return false;
            prevbeg = e.first;
            time = e.second - e.first;
        }

        return true;
    }
};

int main()
{

    return 0;
}